package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是cdt_update_package的数据传输对象基类,直接与表对应<br>
 */
public abstract class UpdatePackageModelBase implements Serializable {

	private static final long serialVersionUID = 1L;

	/**
	 * 属性:id<br>
	 */
	private Integer id = 0;
	/**
	 * 属性:packageUrl<br>
	 */
	private String packageUrl = "";
	/**
	 * 属性:describe<br>
	 */
	private String packageDescribe = "";
	/**
	 * 属性:name<br>
	 */
	private String name = "";
	/**
	 * 属性:md5<br>
	 */
	private String md5 = "";
	/**
	 * 属性:size<br>
	 */
	private Integer size = 0;
	/**
	 * 属性:version<br>
	 */
	private String version = "";
	/**
	 * 属性:addTime<br>
	 */
	private Date addTime = new Date();
	/**
	 * 属性:updateTime<br>
	 */
	private Date updateTime = new Date();
	/**
	 * 属性:opStatus<br>
	 */
	private Integer opStatus = 0;

	private Integer versionNum = 0;

	private String softVersion = "";

	private Integer softVersionNum = 0;

	private String pipeVersion = "";

	/**
	 * 默认构造方法,构造一个默认的UpdatePackageModelBase对象
	 */
	public UpdatePackageModelBase() {
	}

	/**
	 * 构造函数
	 * 
	 * @param rs
	 *            数据库查询结果集
	 */
	public UpdatePackageModelBase(ResultSet rs) {
		try {
			this.id = rs.getInt("id");
			this.packageUrl = rs.getString("packageUrl");
			this.packageDescribe = rs.getString("packageDescribe");
			this.name = rs.getString("name");
			this.md5 = rs.getString("md5");
			this.size = rs.getInt("size");
			this.version = rs.getString("version");
			this.addTime = rs.getDate("addTime");
			this.updateTime = rs.getDate("updateTime");
			this.opStatus = rs.getInt("opStatus");
			this.versionNum = rs.getInt("versionNum");
			this.softVersion = rs.getString("softVersion");
			this.softVersionNum = rs.getInt("softVersionNum");
			this.pipeVersion = rs.getString("pipeVersion");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	
	public String getPipeVersion() {
		return pipeVersion;
	}

	public void setPipeVersion(String pipeVersion) {
		this.pipeVersion = pipeVersion;
	}

	public Integer getVersionNum() {
		return versionNum;
	}

	public void setVersionNum(Integer versionNum) {
		this.versionNum = versionNum;
	}

	/**
	 * 设置属性id<br>
	 * 
	 * @param id
	 *            待设置的属性id的值
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * 获取属性id<br>
	 * 
	 * @return 属性id的值
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * 设置属性packageUrl<br>
	 * 
	 * @param packageUrl
	 *            待设置的属性packageUrl的值
	 */
	public void setPackageUrl(String packageUrl) {
		this.packageUrl = packageUrl;
	}

	/**
	 * 获取属性packageUrl<br>
	 * 
	 * @return 属性packageUrl的值
	 */
	public String getPackageUrl() {
		return packageUrl;
	}

	/**
	 * 设置属性describe<br>
	 * 
	 * @param describe
	 *            待设置的属性describe的值
	 */
	public void setPackageDescribe(String packageDescribe) {
		this.packageDescribe = packageDescribe;
	}

	/**
	 * 获取属性describe<br>
	 * 
	 * @return 属性describe的值
	 */
	public String getPackageDescribe() {
		return packageDescribe;
	}

	/**
	 * 设置属性name<br>
	 * 
	 * @param name
	 *            待设置的属性name的值
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * 获取属性name<br>
	 * 
	 * @return 属性name的值
	 */
	public String getName() {
		return name;
	}

	/**
	 * 设置属性md5<br>
	 * 
	 * @param md5
	 *            待设置的属性md5的值
	 */
	public void setMd5(String md5) {
		this.md5 = md5;
	}

	/**
	 * 获取属性md5<br>
	 * 
	 * @return 属性md5的值
	 */
	public String getMd5() {
		return md5;
	}

	/**
	 * 设置属性size<br>
	 * 
	 * @param size
	 *            待设置的属性size的值
	 */
	public void setSize(Integer size) {
		this.size = size;
	}

	/**
	 * 获取属性size<br>
	 * 
	 * @return 属性size的值
	 */
	public Integer getSize() {
		return size;
	}

	/**
	 * 设置属性version<br>
	 * 
	 * @param version
	 *            待设置的属性version的值
	 */
	public void setVersion(String version) {
		this.version = version;
	}

	/**
	 * 获取属性version<br>
	 * 
	 * @return 属性version的值
	 */
	public String getVersion() {
		return version;
	}

	/**
	 * 设置属性addTime<br>
	 * 
	 * @param addTime
	 *            待设置的属性addTime的值
	 */
	public void setAddTime(Date addTime) {
		this.addTime = addTime;
	}

	/**
	 * 获取属性addTime<br>
	 * 
	 * @return 属性addTime的值
	 */
	public Date getAddTime() {
		return addTime;
	}

	/**
	 * 设置属性updateTime<br>
	 * 
	 * @param updateTime
	 *            待设置的属性updateTime的值
	 */
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	/**
	 * 获取属性updateTime<br>
	 * 
	 * @return 属性updateTime的值
	 */
	public Date getUpdateTime() {
		return updateTime;
	}

	/**
	 * 设置属性opStatus<br>
	 * 
	 * @param opStatus
	 *            待设置的属性opStatus的值
	 */
	public void setOpStatus(Integer opStatus) {
		this.opStatus = opStatus;
	}

	/**
	 * 获取属性opStatus<br>
	 * 
	 * @return 属性opStatus的值
	 */
	public Integer getOpStatus() {
		return opStatus;
	}

	public String getSoftVersion() {
		return softVersion;
	}

	public void setSoftVersion(String softVersion) {
		this.softVersion = softVersion;
	}

	public Integer getSoftVersionNum() {
		return softVersionNum;
	}

	public void setSoftVersionNum(Integer softVersionNum) {
		this.softVersionNum = softVersionNum;
	}

	/**
	 * 比较两个对象在逻辑上是否相等
	 * 
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof UpdatePackageModelBase)) {
			return false;
		}

		final UpdatePackageModelBase otherModel = (UpdatePackageModelBase) other;
		if (getId() != null && !getId().equals(otherModel.getId())) {
			return false;
		}
		return true;
	}

	/**
	 * 根据主键生成HashCode
	 * 
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		StringBuffer buffer = new StringBuffer();
		buffer.append('|').append(id);
		return buffer.toString().hashCode();
	}
}
